|
|
|
|
|
|
|
(table continued from previous page) |
|
|
|
|
| Suffix | Usage | Example | | Get | Retrieves the value of something on another form | StatusGet | | Set | Sets the value of something on another form | StatusSet | | Check | Checks the data the user typed in | FormCheck | | Clear | Clears the controls on a form to a default state | FormClear | | Load | Loads a combo or list box | cboStateLoad | | Kill | Kills module-level variables | FormKill |
|
|
|
|
|
|
The reason for this naming standard is to follow the object and event paradigm that has already been set in Visual Basic. Additionally, Visual Basic sorts the procedure names in the Procedure combo box alphabetically. By naming everything with an object name first, all the procedures for one object show up in one place. |
|
|
|
|
|
|
|
|
Visual Basic events always start with the object name, followed by an underscore, and then the event. The object is a noun, and the event is a verb or action. Follow this naming standard for your own functions. |
|
|
|
 |
|
|
|
|
NOTE Microsoft formerly used the verb first, followed by the noun. This was the reverse of object-oriented standards as well as Microsofts own way of naming event procedures. The company has since changed its way of doing this. |
|
|
|
|
|
|
|
|
This chapter introduced you to the use of your own custom procedures and functions. You learned to create procedures and functions both with and without arguments. You also learned the difference between ByVal and ByRef. (Remember to always use ByVal unless you need to return more than one value from a function.) |
|
|
|
|
|
|
|
|
1. True or False? You may use a letter or underscore as the first character for a procedure name. |
|
|
|
|
|
|
|
|
2. Whats the file extension used for code modules? |
|
|
|
|
|